package com.zhao.common.util;

import java.util.HashMap;
import java.util.Map;

import com.zhao.common.support.StatusCodeEnum;

public class DictionaryUtil {
	public static Map<String,Object> statusCodeMap=new HashMap<String,Object>();
	public static void init(){
		for(StatusCodeEnum statusCodeEnum: StatusCodeEnum.values()){
			statusCodeMap.put(statusCodeEnum.getStatusCode(), statusCodeEnum);
		}
	}
	public static Map<String,Object> getStatusCodeMap(){
		if(!statusCodeMap.isEmpty()){
			return statusCodeMap;
		}
		init();
		return statusCodeMap;
	}
	public static void refresh(){
		statusCodeMap.clear();
		init();
	}
}
